package jblip.base.resources;

import jblip.resources.Media;
import jblip.resources.Update;

class BaseMedia implements Media {
  private static final long serialVersionUID = 1L;

  private final String url_;

  private final Integer id_;
  
  private final MediaType type_;

  private Update update_;
  private String update_path_;

  BaseMedia(int id, String url, MediaType type) {
    this.url_ = url;
    this.id_ = id;
    this.type_ = type;
    this.update_ = null;
    this.update_path_ = null;
  }

  public Integer getID() {
    return id_;
  }

  public String getURL() {
    return url_;
  }

  @Override
  public Update getUpdate() {
    return update_;
  }

  @Override
  public String getUpdatePath() {
    return update_path_;
  }

  @Override
  public MediaType getType() {
    return this.type_;
  }

  void setUpdate(Update update) {
    this.update_ = update;
    
  }

  void setUpdatePath(String path) {
    this.update_path_ = path;
  }
}
